home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / unix / ch11 / 11fig01a.wrl < prev    next >
Text File  |  1996-09-22  |  2KB  |  91 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Switch {
  6.     whichChoice 0
  7.     choice [
  8.     # Version 0:  simple round background
  9.         Group {
  10.             children [
  11.                 DEF Cafe Shape {
  12.                     appearance DEF GlowWhite Appearance {
  13.                         material Material {
  14.                             emissiveColor 1.0 1.0 1.0
  15.                             diffuseColor  0.0 0.0 0.0
  16.                         }
  17.                     }
  18.                     geometry Text {
  19.                         string "Cafe"
  20.                         fontStyle FontStyle {
  21.                             justify "MIDDLE"
  22.                         }
  23.                     }
  24.                 },
  25.                 DEF BlueDisk Transform {
  26.                     translation 0.0 0.3 -0.10
  27.                     rotation    1.0 0.0 0.0 -1.57
  28.                     children Shape {
  29.                         appearance Appearance {
  30.                             material Material {
  31.                                 diffuseColor  0.0 0.3 0.8
  32.                             }
  33.                         }
  34.                         geometry Cylinder {
  35.                             radius 1.3
  36.                             height 0.1
  37.                         }
  38.                     }
  39.                 }
  40.             ]
  41.         },
  42.     # Version 1:  round background with white edge
  43.         Group {
  44.             children [
  45.                 USE Cafe,
  46.                 USE BlueDisk,
  47.                 DEF WhiteDisk Transform {
  48.                     translation 0.0 0.3 -0.10
  49.                     rotation    1.0 0.0 0.0 -1.57
  50.                     children Shape {
  51.                         appearance USE GlowWhite
  52.                         geometry Cylinder {
  53.                             radius 1.4
  54.                             height 0.08
  55.                         }
  56.                     }
  57.                 }
  58.             ]
  59.         },
  60.     # Version 2:  round background, white edge, red box
  61.         Group {
  62.             children [
  63.                 USE Cafe,
  64.                 USE BlueDisk,
  65.                 USE WhiteDisk,
  66.                 DEF RedAndWhiteBoxes Transform {
  67.                     translation 0.0 0.3 -0.10
  68.                     children [
  69.                         Shape {
  70.                             appearance Appearance {
  71.                                 material Material {
  72.                                     diffuseColor 0.8 0.0 0.0
  73.                                 }
  74.                             }
  75.                             geometry Box {
  76.                                 size 4.0 1.2 0.06
  77.                             }
  78.                         },
  79.                         Shape {
  80.                             appearance USE GlowWhite
  81.                             geometry Box {
  82.                                 size 4.2 1.4 0.04
  83.                             }
  84.                         }
  85.                     ]
  86.                 }
  87.             ]
  88.         }
  89.     ]
  90. }
  91.